package com.zx.cloud.controller.client;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.zx.cloud.Shift;
import com.zx.cloud.controller.StatusCode;
import com.zx.cloud.domain.Role;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

/**
 * @author Alex
 */
@Component
public class RoleClientFallback implements RoleClient {
	
    private static final Logger LOGGER = LoggerFactory.getLogger(RoleClientFallback.class);

    private void didNotGetResponse() {
        LOGGER.error("service '{}' has become unreachable", RoleClient.SERVICE_ID);
    }
    
	@Override
	public ObjectDataResponse<Page<Role>> queryRole(Role role) {
		// TODO Auto-generated method stub
		didNotGetResponse();
	    Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}

	@Override
	public ObjectDataResponse<Integer> updateRole(Role role) {
		// TODO Auto-generated method stub
		didNotGetResponse();
	    Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}

	@Override
	public ObjectDataResponse<Object> removeRole(Role role) {
		// TODO Auto-generated method stub
		didNotGetResponse();
	    Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}

	@Override
	public ObjectDataResponse<Integer> addRole(Role role) {
		// TODO Auto-generated method stub
		didNotGetResponse();
	    Shift.fatal(StatusCode.SERVER_IS_BUSY_NOW);
		return null;
	}

	
  


}
